コード例 #1
0
        public static MainModel ToModel(TextDemoSettings Settings)
        {
            var model = new MainModel()
            {
                UserName             = Settings.UserName,
                IpAddr               = Settings.IpAddr,
                Password             = Settings.Password,
                FtpCommandRecentList = Settings.FtpCommandRecentList
            };

            return(model);
        }
コード例 #2
0
        private void MainWindow_Closed(object sender, EventArgs e)
        {
            {
                var settings = TextDemoSettings.RecallSettings();

                settings.WindowClientSize =
                    new Size(this.ActualWidth, this.ActualHeight);
                settings.IpAddr               = this.Model.IpAddr;
                settings.UserName             = this.Model.UserName;
                settings.Password             = this.Model.Password;
                settings.FtpCommandRecentList = this.Model.FtpCommandRecentList;

                settings.StoreSettings();
            }
        }
コード例 #3
0
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            var settings = TextDemoSettings.RecallSettings();

            if (settings.WindowClientSize.Height > 0)
            {
                this.Height = settings.WindowClientSize.Height;
                this.Width  = settings.WindowClientSize.Width;
            }
            this.Model          = MainModel.ToModel(settings);
            grdMain.DataContext = this.Model;


            this.Canvas1.Focusable = true;
            this.Canvas1.Focus();
            this.ScreenCanvas = new TestCanvas(this.Canvas1, 9.83, 18.5, 50, 15);
            this.ScreenCanvas.ScreenExitEvent += ScreenCanvas_ScreenExitEvent;

            this.LogFile = new LogFile("c:\\downloads\\textCanvasLog.txt", LogFileAction.Clear);
            this.ScreenCanvas.LogFile = this.LogFile;
        }