コード例 #1
0
ファイル: DesktopGUI.g.cs プロジェクト: Logeshkumar/Projects
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Window = ((edu.syr.cse784.eskimodb.ClientGUI.DesktopGUI)(target));
     return;
     case 2:
     this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.m_TxbTableName = ((System.Windows.Controls.TextBox)(target));
     return;
     case 4:
     this.m_dataGridTable = ((System.Windows.Controls.DataGrid)(target));
     
     #line 48 "..\..\..\DesktopGUI.xaml"
     this.m_dataGridTable.SizeChanged += new System.Windows.SizeChangedEventHandler(this.m_dataGridTable_SizeChanged);
     
     #line default
     #line hidden
     
     #line 48 "..\..\..\DesktopGUI.xaml"
     this.m_dataGridTable.Loaded += new System.Windows.RoutedEventHandler(this.m_dataGridTable_Loaded);
     
     #line default
     #line hidden
     
     #line 48 "..\..\..\DesktopGUI.xaml"
     this.m_dataGridTable.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.m_dataGridTable_SelectionChanged);
     
     #line default
     #line hidden
     
     #line 48 "..\..\..\DesktopGUI.xaml"
     this.m_dataGridTable.BeginningEdit += new System.EventHandler<System.Windows.Controls.DataGridBeginningEditEventArgs>(this.m_dataGridTable_BeginningEdit);
     
     #line default
     #line hidden
     
     #line 48 "..\..\..\DesktopGUI.xaml"
     this.m_dataGridTable.RowEditEnding += new System.EventHandler<System.Windows.Controls.DataGridRowEditEndingEventArgs>(this.m_dataGridTable_RowEditEnding);
     
     #line default
     #line hidden
     return;
     case 6:
     this.m_CreateTable = ((System.Windows.Controls.Button)(target));
     
     #line 83 "..\..\..\DesktopGUI.xaml"
     this.m_CreateTable.Click += new System.Windows.RoutedEventHandler(this.m_CreateTable_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.m_TxtbQuery = ((System.Windows.Controls.TextBox)(target));
     return;
     case 8:
     this.groupBox4 = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 9:
     this.m_EskimoDbTree = ((System.Windows.Controls.TreeView)(target));
     
     #line 117 "..\..\..\DesktopGUI.xaml"
     this.m_EskimoDbTree.Loaded += new System.Windows.RoutedEventHandler(this.TreeView_Loaded);
     
     #line default
     #line hidden
     
     #line 117 "..\..\..\DesktopGUI.xaml"
     this.m_EskimoDbTree.SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler<object>(this.m_EskimoDbTree_SelectedItemChanged);
     
     #line default
     #line hidden
     return;
     case 10:
     this.m_DgContentOfTables = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 11:
     this.m_DeleteTable = ((System.Windows.Controls.Button)(target));
     return;
     case 12:
     
     #line 157 "..\..\..\DesktopGUI.xaml"
     ((System.Windows.Controls.TabItem)(target)).Loaded += new System.Windows.RoutedEventHandler(this.EskimoDBQuery_Loaded);
     
     #line default
     #line hidden
     return;
     case 13:
     this.groupBox1 = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 14:
     this.m_txtEskimoDBQuery = ((System.Windows.Controls.TextBox)(target));
     return;
     case 15:
     this.m_btnExecuteQuery = ((System.Windows.Controls.Button)(target));
     
     #line 167 "..\..\..\DesktopGUI.xaml"
     this.m_btnExecuteQuery.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.m_btnExecuteQuery_PreviewMouseLeftButtonDown);
     
     #line default
     #line hidden
     
     #line 167 "..\..\..\DesktopGUI.xaml"
     this.m_btnExecuteQuery.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.m_btnExecuteQuery_PreviewMouseLeftButtonUp);
     
     #line default
     #line hidden
     return;
     case 16:
     this.groupBox2 = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 17:
     this.dg_QueryResults = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 18:
     this.b_NextPage = ((System.Windows.Controls.Button)(target));
     return;
     case 19:
     this.b_PrevPage = ((System.Windows.Controls.Button)(target));
     return;
     case 20:
     this.lbl_RowsPerPage = ((System.Windows.Controls.Label)(target));
     return;
     case 21:
     this.tb_RowsPerPage = ((System.Windows.Controls.TextBox)(target));
     return;
     case 22:
     
     #line 205 "..\..\..\DesktopGUI.xaml"
     ((System.Windows.Controls.TabItem)(target)).Loaded += new System.Windows.RoutedEventHandler(this.AccountMgmtTab_Loaded);
     
     #line default
     #line hidden
     return;
     case 23:
     this.groupBox3 = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 24:
     this.lbl_AIUsername = ((System.Windows.Controls.Label)(target));
     return;
     case 25:
     this.lbl_AIPassword = ((System.Windows.Controls.Label)(target));
     return;
     case 26:
     this.lbl_AIConfirmPassword = ((System.Windows.Controls.Label)(target));
     return;
     case 27:
     this.tb_AIUsername = ((System.Windows.Controls.TextBox)(target));
     return;
     case 28:
     this.tb_AIPassword = ((System.Windows.Controls.TextBox)(target));
     return;
     case 29:
     this.tb_AIConfirmPassword = ((System.Windows.Controls.TextBox)(target));
     return;
     case 30:
     this.bn_Save = ((System.Windows.Controls.Button)(target));
     
     #line 215 "..\..\..\DesktopGUI.xaml"
     this.bn_Save.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.bn_Save_PreviewMouseLeftButtonDown);
     
     #line default
     #line hidden
     
     #line 215 "..\..\..\DesktopGUI.xaml"
     this.bn_Save.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.bn_Save_PreviewMouseLeftButtonUp);
     
     #line default
     #line hidden
     return;
     case 31:
     this.bn_New = ((System.Windows.Controls.Button)(target));
     
     #line 238 "..\..\..\DesktopGUI.xaml"
     this.bn_New.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.bn_New_PreviewMouseLeftButtonDown);
     
     #line default
     #line hidden
     
     #line 238 "..\..\..\DesktopGUI.xaml"
     this.bn_New.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.bn_New_PreviewMouseLeftButtonUp);
     
     #line default
     #line hidden
     return;
     case 32:
     this.cb_UserAccounts = ((System.Windows.Controls.ComboBox)(target));
     
     #line 261 "..\..\..\DesktopGUI.xaml"
     this.cb_UserAccounts.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cb_UserAccounts_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 33:
     this.lbl_UserAccounts = ((System.Windows.Controls.Label)(target));
     return;
     case 34:
     this.m_LblLevel = ((System.Windows.Controls.Label)(target));
     return;
     case 35:
     this.m_CmbUserPrivilege = ((System.Windows.Controls.ComboBox)(target));
     
     #line 264 "..\..\..\DesktopGUI.xaml"
     this.m_CmbUserPrivilege.Loaded += new System.Windows.RoutedEventHandler(this.m_CmbUserPrivilege_Loaded);
     
     #line default
     #line hidden
     
     #line 264 "..\..\..\DesktopGUI.xaml"
     this.m_CmbUserPrivilege.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.m_CmbUserPrivilege_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 36:
     this.m_tbQueryResults = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #2
0
ファイル: Signin.xaml.cs プロジェクト: Logeshkumar/Projects
 private void m_btnLogIn_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
   try
   {
     string temptoken;
     m_clientapi = new ClientAPI();
     m_clientapi.SetAuthHostAddress(m_TxtAuthURL.Text.ToString());
     m_clientapi.SetRootServer(m_TxtRootURL.Text.ToString());
     m_clientapi.ConfigClient();
     AuthResult m_AuthResult = m_clientapi.AuthenticateUser(m_txtUserName.Text, m_txtPassWord.Password, out temptoken);
     if (m_AuthResult.valid)
     {
       Logger.LogWrite("User: "******" is authenticated");
       MessageBox.Show(m_txtUserName.Text + " Authenticated!!!", "Eskimo DB");
       DesktopGUI m_UserMenuWindow = new DesktopGUI(temptoken, m_TxtRootURL.Text.ToString(), m_TxtAuthURL.Text.ToString());
       m_UserMenuWindow.Show();
       this.Close();
     }
     else
     {
       Logger.LogWrite("User: "******" is not authenticated");
       MessageBox.Show(m_AuthResult.msg);
       m_txtUserName.Text = string.Empty;
       m_txtPassWord.Password = string.Empty;
     }
   }
   catch (Exception ex)
   {
     MessageBox.Show("Please enter valid url. Error Message :" + ex.Message, "EskimoDB");
   }
 }