Ejemplo n.º 1
0
 private void method_13(object sender, ExecuteRoutedEventArgs e)
 {
     if (new OptionsEdit(this.mainViewModel_0.Options).ShowDialog() == true)
     {
         this.method_14(this.mainViewModel_0.Options);
     }
 }
Ejemplo n.º 2
0
 private void buttonReanalyze_Click(object sender, ExecuteRoutedEventArgs e)
 {
     if (new OptionsEdit(_mainViewModel.Options).ShowDialog() == true)
     {
         OpenAnalyzingWindow(_mainViewModel.Options);
     }
 }
Ejemplo n.º 3
0
        private void buttonWheel_Click(object sender, ExecuteRoutedEventArgs e)
        {
            if (_mainViewModel.BlockCount > 1500)
            {
                MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Whoa, it looks like you have *a lot* of duplicate code there. Drawing this much duplication on the wheel may take a long time to draw and will make interaction with the wheel very very slow. Are you sure you want to continue?", "Continue?", MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
                if (messageBoxResult != MessageBoxResult.Yes)
                {
                    return;
                }
            }

            if (_wheelView == null)
            {
                WheelView wheelView = new WheelView(_mainViewModel.Files, _mainViewModel.RootDirectories.First <CodeDir>());
                wheelView.Closed             += wheelView_Closed;
                wheelView.CodeFileSelected   += wheelView_CodeFileSelected;
                wheelView.SimilaritySelected += wheelView_SimilaritySelected;
                wheelView.Show();

                _wheelView = wheelView;
            }
            else
            {
                _wheelView.Activate();
            }
        }
Ejemplo n.º 4
0
        private void method_9(object sender, ExecuteRoutedEventArgs e)
        {
            Options options = new Options();

            if (new OptionsEdit(options).ShowDialog() == true)
            {
                this.method_14(options);
            }
        }
Ejemplo n.º 5
0
        private void method9(object sender, ExecuteRoutedEventArgs e)
        {
            Options options = new Options();

            if (new OptionsEdit(options).ShowDialog() == true)
            {
                OpenAnalyzingWindow(options);
            }
        }
Ejemplo n.º 6
0
		private void Properties_OnClick(object sender, ExecuteRoutedEventArgs e)
		{
			var wnd = new PropertiesWindow
			{
				SelectedObject = SelectedObject.Clone(),
				IsReadOnly = IsReadOnly
			};

			if (wnd.ShowModal(this))
				SelectedObject.Load(wnd.SelectedObject.Save());
		}
Ejemplo n.º 7
0
        private void OnChangeOrdersButtonClick(object sender, ExecuteRoutedEventArgs e)
        {
            if (Model.State != SystemAssaultScreenState.AwaitingPlayerOrders)
            {
                return;
            }

            Model.SelectedAction = null;

            _actionTabs.SelectedItem = _chooseActionTab;
        }
Ejemplo n.º 8
0
 private void method_11(object sender, ExecuteRoutedEventArgs e)
 {
     Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog();
     openFileDialog.Title            = "Load Atomiq Project";
     openFileDialog.DefaultExt       = "atomiqProj";
     openFileDialog.Filter           = "Atomiq Project (*.atomiqProj)|*.atomiqProj";
     openFileDialog.RestoreDirectory = true;
     if (openFileDialog.ShowDialog() == true)
     {
         this.method_10(openFileDialog.FileName);
     }
 }
Ejemplo n.º 9
0
        private void Properties_OnClick(object sender, ExecuteRoutedEventArgs e)
        {
            var wnd = new PropertiesWindow
            {
                SelectedObject = SelectedObject.Clone(),
                IsReadOnly     = IsReadOnly
            };

            if (wnd.ShowModal(this))
            {
                SelectedObject.Load(wnd.SelectedObject.Save());
            }
        }
Ejemplo n.º 10
0
 private void method_12(object sender, ExecuteRoutedEventArgs e)
 {
     Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog();
     saveFileDialog.Title            = "Save Atomiq Project";
     saveFileDialog.DefaultExt       = "atomiqProj";
     saveFileDialog.Filter           = "Atomiq Project (*.atomiqProj)|*.atomiqProj";
     saveFileDialog.RestoreDirectory = true;
     if (saveFileDialog.ShowDialog() == true)
     {
         using (StreamWriter streamWriter = new StreamWriter(saveFileDialog.FileName))
         {
             string value = XmlUtil.ConvertToXml(this.mainViewModel_0.Options);
             streamWriter.Write(value);
         }
     }
 }
Ejemplo n.º 11
0
		private void SourceElements_OnClick(object sender, ExecuteRoutedEventArgs e)
		{
			((Button)sender).IsChecked = !((Button)sender).IsChecked;
		}
Ejemplo n.º 12
0
		private void buttonWheel_Click(object sender, ExecuteRoutedEventArgs e)
		{
			if (_mainViewModel.BlockCount > 1500)
			{
				MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Whoa, it looks like you have *a lot* of duplicate code there. Drawing this much duplication on the wheel may take a long time to draw and will make interaction with the wheel very very slow. Are you sure you want to continue?", "Continue?", MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
				if (messageBoxResult != MessageBoxResult.Yes)
				{
					return;
				}
			}

			if (_wheelView == null)
			{
				WheelView wheelView = new WheelView(_mainViewModel.Files, _mainViewModel.RootDirectories.First<CodeDir>());
				wheelView.Closed += wheelView_Closed;
				wheelView.CodeFileSelected += wheelView_CodeFileSelected;
				wheelView.SimilaritySelected += wheelView_SimilaritySelected;
				wheelView.Show();

				_wheelView = wheelView;
			}
			else
			{
				_wheelView.Activate();
			}
		}
Ejemplo n.º 13
0
		private void buttonReanalyze_Click(object sender, ExecuteRoutedEventArgs e)
		{
			if (new OptionsEdit(_mainViewModel.Options).ShowDialog() == true)
			{
				OpenAnalyzingWindow(_mainViewModel.Options);
			}
		}
Ejemplo n.º 14
0
		private void buttonSave_Click(object sender, ExecuteRoutedEventArgs e)
		{
			Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog();
			saveFileDialog.Title = "Save Atomiq Project";
			saveFileDialog.DefaultExt = "atomiqProj";
			saveFileDialog.Filter = "Atomiq Project (*.atomiqProj)|*.atomiqProj";
			saveFileDialog.RestoreDirectory = true;

			if (saveFileDialog.ShowDialog() == true)
			{
				using (StreamWriter streamWriter = new StreamWriter(saveFileDialog.FileName))
				{
					string value = XmlUtil.ConvertToXml(_mainViewModel.Options);
					streamWriter.Write(value);
				}
			}
		}
Ejemplo n.º 15
0
		private void buttonOpen_Click(object sender, ExecuteRoutedEventArgs e)
		{
			Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog();
			openFileDialog.Title = "Load Atomiq Project";
			openFileDialog.DefaultExt = "atomiqProj";
			openFileDialog.Filter = "Atomiq Project (*.atomiqProj)|*.atomiqProj";
			openFileDialog.RestoreDirectory = true;

			if (openFileDialog.ShowDialog() == true)
			{
				method10(openFileDialog.FileName);
			}
		}
Ejemplo n.º 16
0
		private void method9(object sender, ExecuteRoutedEventArgs e)
		{
			Options options = new Options();

			if (new OptionsEdit(options).ShowDialog() == true)
			{
				OpenAnalyzingWindow(options);
			}
		}
Ejemplo n.º 17
0
 private void SourceElements_OnClick(object sender, ExecuteRoutedEventArgs e)
 {
     ((Button)sender).IsChecked = !((Button)sender).IsChecked;
 }
Ejemplo n.º 18
0
		private void method_9(object sender, ExecuteRoutedEventArgs e)
		{
			Options options = new Options();
			if (new OptionsEdit(options).ShowDialog() == true)
			{
				this.method_14(options);
			}
		}
Ejemplo n.º 19
0
		private void method_13(object sender, ExecuteRoutedEventArgs e)
		{
			if (new OptionsEdit(this.mainViewModel_0.Options).ShowDialog() == true)
			{
				this.method_14(this.mainViewModel_0.Options);
			}
		}