initial oogynize check in _ this actually used to work!
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<Page
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Foo.ClientServices.ButtonWPForm.ButtonFormPages.Page_AddEdit"
|
||||
Title="Page_AddEdit" Loaded="Page_Loaded" mc:Ignorable="d" Height="255" Width="550">
|
||||
<Grid d:LayoutOverrides="VerticalMargin">
|
||||
<Border CornerRadius="6" Background="Gray" Opacity="0.325" HorizontalAlignment="Left" Width="550"/>
|
||||
<TextBox Margin="90,33,39,0" x:Name="txtTitle" Height="22" VerticalAlignment="Top" />
|
||||
<Label Height="28" HorizontalAlignment="Left" Margin="48,30.667,0,0" x:Name="lblTitle" VerticalAlignment="Top" Width="36" Foreground="White" Content="Title" RenderTransformOrigin="-1.028,1.036"/>
|
||||
<TextBox TextAlignment="Left" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" Margin="90,0,39,77.671" x:Name="txtLocation" Background="Transparent" Foreground="White" BorderBrush="{x:Null}" Focusable="False" IsTabStop="False" VerticalAlignment="Bottom" Height="40" />
|
||||
<ComboBox Margin="90,85,39,0" x:Name="comboWorkspaces" Height="24" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" />
|
||||
<Label HorizontalAlignment="Left" Margin="12,83.334,0,0" x:Name="label1" Width="74" Foreground="White" Height="27" VerticalAlignment="Top" Content="Workspace" d:LayoutOverrides="VerticalAlignment"/>
|
||||
<Label Height="24" HorizontalAlignment="Right" Margin="0,55,29,0" x:Name="lblRequired" VerticalAlignment="Top" Width="54" Foreground="White" FontSize="10" FontStyle="Italic" Content="Required" RenderTransformOrigin="1.963,0.542"/>
|
||||
<Label FontSize="10" FontStyle="Italic" Foreground="White" Height="24" HorizontalAlignment="Right" Margin="0,108.331,29,0" x:Name="lblRequired3" VerticalAlignment="Top" Width="54" Content="Required"/>
|
||||
<Button HorizontalAlignment="Left" Margin="90,201.649,0,0" x:Name="btnCancel" Width="75" Click="btnCancel_Click" Content="Cancel" VerticalAlignment="Top" Height="23"/>
|
||||
<Button HorizontalAlignment="Right" Margin="0,201.649,39,0" x:Name="btnAdd" Width="75" Click="btnAdd_Click" Content="Add" VerticalAlignment="Top" Height="23"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Reflection;
|
||||
|
||||
// Ooganizer Namespaces
|
||||
using Foo.Platform;
|
||||
using Foo.Platform.Interacters;
|
||||
|
||||
namespace Foo.ClientServices.ButtonWPForm.ButtonFormPages
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ButtonFormPage_AddEdit.xaml
|
||||
/// </summary>
|
||||
public partial class Page_AddEdit : Page, IButtonFormPage
|
||||
{
|
||||
#region IButtonFormPage
|
||||
public ButtonForm ParentWPFContainer { get { return _ButtonForm; } set { _ButtonForm = value; } }
|
||||
private ButtonForm _ButtonForm = null;
|
||||
#endregion
|
||||
|
||||
// Declare the Log4net Variable
|
||||
private static log4net.ILog Log = Logger.GetLog4NetInterface(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public Page_AddEdit()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Page_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ParentWPFContainer == null)
|
||||
{
|
||||
Log.Debug(string.Format("{0}() - ParentWPFContainer is null this should never happen", MethodBase.GetCurrentMethod().Name));
|
||||
return;
|
||||
}
|
||||
|
||||
// Set the Artifact Properties
|
||||
//txtTitle.Text = ParentWPFContainer.ArtifactTitle;
|
||||
|
||||
// se
|
||||
//txtLocation.Text = ParentWPFContainer.ArtifactLocation;
|
||||
//txtLocation.ScrollToEnd();
|
||||
|
||||
// Add all workspaces to the combo selection
|
||||
//foreach (Ooganizer.API.Workspace wspace in SrvrCommon.Workspaces)
|
||||
// comboWorkspaces.Items.Add(wspace.Name);
|
||||
|
||||
////
|
||||
// Default to the current Workspace or 0 if none are loaded
|
||||
////
|
||||
//if (ParentWPFContainer.CurrentWorkspaceName == "")
|
||||
// comboWorkspaces.SelectedIndex = 0;
|
||||
//else
|
||||
// comboWorkspaces.SelectedValue = ParentWPFContainer.CurrentWorkspaceName;
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
BHInteracter.SetW32ButtonToNewState(ParentWPFContainer.HookedWindow, BHInteracter.BUTTON_HOOK_STATE.BUTTON_ADD);
|
||||
ParentWPFContainer.Close();
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//SrvrCommon.AddArtifactToWorkspace(txtTitle.Text, txtLocation.Text, ParentWPFContainer.SnapShot, ParentWPFContainer.CurrentWorkspaceName);
|
||||
//BHInteracter.SetW32ButtonToNewState(ParentWPFContainer.HookedWindow, BHInteracter.BUTTON_HOOK_STATE.BUTTON_DELETE);
|
||||
ParentWPFContainer.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user