コード例 #1
0
        private void OnClickButtonNewJsonFile(object sender, RoutedEventArgs e)
        {
            if (!SSHController.ReConnect())
            {
                return;
            }
            if (ConfigOptionManager.Path != null)
            {
                ;
            }
            WindowMain.CallBack afterSave_callback = null;
            MenuItem            mi = sender as MenuItem;

            if (mi.Header as string == "_File")
            {
                afterSave_callback = NewJsonFile_File;
            }
            if (mi.Header as string == "_Sam")
            {
                afterSave_callback = NewJsonFile_Sam;
            }
            if (mi.Header as string == "_Tail")
            {
                afterSave_callback = NewJsonFile_Tail;
            }

            ConfirmSave(afterSave_callback);
        }
コード例 #2
0
        private void OnClickButtonNewJsonFile(object sender, RoutedEventArgs e)
        {
            if (!SSHController.ReConnect())
            {
                return;
            }
            if (ConfigOptionManager.Path != null)
            {
                ;
            }
            WindowMain.CallBack afterSave_callback = null;
            MenuItem            mi = sender as MenuItem;

            if (mi.Header as string == "_File")
            {
                afterSave_callback = NewJsonFile_File;
            }
            if (mi.Header as string == "_Sam")
            {
                afterSave_callback = NewJsonFile_Sam;
            }
            if (mi.Header as string == "_Tail")
            {
                afterSave_callback = NewJsonFile_Tail;
            }
            //if(mi.Header as string == "_File")
            //	afterSave_callback = delegate { WindowMain.current.ShowMessageDialog("New File Config", "새로만드시겠습니까?", MessageDialogStyle.AffirmativeAndNegative, NewJsonFile_File); };
            //if(mi.Header as string == "_Sam")
            //	afterSave_callback = delegate { WindowMain.current.ShowMessageDialog("New File Config", "새로만드시겠습니까?", MessageDialogStyle.AffirmativeAndNegative, NewJsonFile_Sam); };
            //if(mi.Header as string == "_Tail")
            //	afterSave_callback = delegate { WindowMain.current.ShowMessageDialog("New File Config", "새로만드시겠습니까?", MessageDialogStyle.AffirmativeAndNegative, NewJsonFile_Tail); };

            ConfirmSave(afterSave_callback);
        }
コード例 #3
0
 private void TabUpdate()
 {
     SSHController.ReConnect();
     if (SSHController.IsConnected)
     {
         if (!bUpdateLinuxTree && UserControls.Cofile.current != null && tabControl.SelectedIndex == 0)
         {
             UserControls.Cofile.current.Refresh();
             bUpdateLinuxTree = true;
         }
         if (!bUpdateDataBase && (tabControl.SelectedIndex == 2 || tabControl.SelectedIndex == 3))
         //&& idx_tab_before_change != 2 && idx_tab_before_change != 3
         //&& (tabControl.SelectedIndex == 2 || tabControl.SelectedIndex == 3))
         {
             //UserControls.DataBaseInfo.RefreshUi(Changed_server_name);
             UserControls.DataBaseInfo.RefreshUi();
             bUpdateDataBase = true;
         }
         if (!bUpdateConfigFile && UserControls.ConfigOption.current != null && tabControl.SelectedIndex == 1)
         {
             UserControls.ConfigOption.current.Clear();
             bUpdateConfigFile = true;
         }
     }
 }
コード例 #4
0
        private void OnClickConnectServer(object sender, RoutedEventArgs e)
        {
            //if(ServerList.selected_serverinfo_textblock == null)
            //	return;
            ServerInfoTextBlock sitb = this.SelectedItem as ServerInfoTextBlock;

            if (sitb == null)
            {
                return;
            }

            SSHController.ReConnect();
            WindowMain.current.Refresh(sitb.serverinfo.name);
        }
コード例 #5
0
        public int InitOpenFile()
        {
            if (SSHController.ReConnect())
            {
                //if(RemoveConfigFile(CurRootPathLocal) != 0)
                //	return -2;

                if (SSHController.GetConfig(CurRootPathLocal) == null)
                {
                    return(-1);
                }

                return(0);
            }
            return(-3);
        }
コード例 #6
0
        public int InitOpenFile()
        {
            if (SSHController.ReConnect())
            {
                int retval = 0;
                if (RemoveConfigFile(CurRootPathLocal) != 0)
                {
                    retval = -2;
                }

                if (SSHController.GetConfig(CurRootPathLocal) == null)
                {
                    return(-1);
                }

                return(retval);
            }
            return(-3);
        }