예제 #1
0
        public void SaveSettingsAction()
        {
            SectionOpacity            = 1;
            ServerSectionCache.SSPath = "";
            OnPropertyChanged(nameof(SectionOpacity));
            ServerSectionCache.SectionObject = null;
            Complex.Title     = Title;
            Complex.JarFile   = JarFile;
            Complex.MinRam    = MinRam;
            Complex.MaxRam    = MaxRam;
            Complex.Parameter = Parameter;
            try
            {
                ServerPath = JarFile.Replace(JarFile.Split('\\').LastOrDefault(), "");
            }
            catch { }
            Complex.StartFolder = ServerPath;


            CurrentHeight = 100;

            ChangeDate = DateTime.Now.ToString();
            OnPropertyChanged(nameof(Title));
            OnPropertyChanged(nameof(ChangeDate));
            OnPropertyChanged(nameof(CurrentHeight));
            Complex.ChangeDate = ChangeDate;
            ServerSave.SaveSettingsContainer();
            ServerSectionCache.ChangeSection();
        }
예제 #2
0
 public void OpenSettigsAction()
 {
     CurrentHeight = 310;
     OnPropertyChanged(nameof(CurrentHeight));
     ServerSectionCache.SSPath = ServerPath;
     SectionOpacity            = 0.5;
     OnPropertyChanged(nameof(SectionOpacity));
     ServerSectionCache.SectionObject = this;
     ServerSectionCache.ChangeSection();
 }
예제 #3
0
        public void OpenFolderAction()
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.FileOk += (e, y) => { if (y.Cancel == false)
                                                 {
                                                     JarFile = openFileDialog.FileName; OnPropertyChanged(nameof(JarFile));
                                                 }
            };
            openFileDialog.ShowDialog();
            ServerSectionCache.ChangeSection();
        }
예제 #4
0
        public void CancelAction()
        {
            SectionOpacity            = 1;
            ServerSectionCache.SSPath = "";
            OnPropertyChanged(nameof(SectionOpacity));
            ServerSectionCache.SectionObject = null;
            Title      = Complex.Title;
            JarFile    = Complex.JarFile;
            MinRam     = Complex.MinRam;
            MaxRam     = Complex.MaxRam;
            Parameter  = Complex.Parameter;
            ServerPath = Complex.StartFolder;
            ChangeDate = Complex.ChangeDate;

            OnPropertyChanged(nameof(Title));
            OnPropertyChanged(nameof(JarFile));
            OnPropertyChanged(nameof(MinRam));
            OnPropertyChanged(nameof(MaxRam));
            OnPropertyChanged(nameof(Parameter));
            OnPropertyChanged(nameof(ChangeDate));
            CurrentHeight = 100;
            OnPropertyChanged(nameof(CurrentHeight));
            ServerSectionCache.ChangeSection();
        }