Example #1
0
 private void varFormat_MouseLeftButtonDown(object sender, System.Windows.RoutedEventArgs e)
 {
     // TODO: Add event handler implementation here.
     fv = new FormattedValue();
     fv.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
     fv.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
     fv.Show();
     fv.Closed += new EventHandler(rv_Closed);
     //menuVar.Hide();
     menuVar.Visibility = System.Windows.Visibility.Collapsed;
     //menuVar.Visibility = System.Windows.Visibility.Collapsed;
 }
Example #2
0
        private void btnEditRule_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            //SlideIn.Begin();
            if (lbxRules.SelectedIndex > -1)
            {
                switch (((ListBoxItemSource)lbxRules.SelectedItem).RuleType)
                {
                case EwavRuleType.Recode:
                    rv = new RecodedVariable(true, (ListBoxItemSource)lbxRules.SelectedItem);
                    rv.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                    rv.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
                    //rv.SelectedItem = ;
                    rv.Show();
                    rv.Closed += new EventHandler(rv_Closed);
                    break;

                case EwavRuleType.Assign:

                    ae = new AssignedExpression(true, (ListBoxItemSource)lbxRules.SelectedItem);
                    ae.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                    ae.VerticalAlignment   = System.Windows.VerticalAlignment.Center;

                    ae.Show();
                    ae.Closed += new EventHandler(rv_Closed);


                    break;

                case EwavRuleType.Formatted:
                    fv = new FormattedValue(true, (ListBoxItemSource)lbxRules.SelectedItem);
                    fv.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                    fv.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
                    fv.Show();
                    fv.Closed += new EventHandler(rv_Closed);
                    break;

                case EwavRuleType.Simple:
                    sa = new SimpleAssignment(true, (ListBoxItemSource)lbxRules.SelectedItem);
                    sa.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                    sa.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
                    sa.Show();
                    sa.Closed += new EventHandler(rv_Closed);
                    break;

                case EwavRuleType.conditional:
                    ConditionalAssign ca = new ConditionalAssign(true, (ListBoxItemSource)lbxRules.SelectedItem);
                    ca.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                    ca.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
                    ca.Show();
                    ca.Closed += new EventHandler(rv_Closed);
                    break;

                case EwavRuleType.GroupVariable:
                    GroupVariable gv = new GroupVariable(true, (ListBoxItemSource)lbxRules.SelectedItem);
                    gv.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                    gv.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
                    gv.Show();
                    gv.Closed += new EventHandler(rv_Closed);
                    break;

                default:
                    break;
                }
                //if (((ListBoxItemSource)lbxRules.SelectedItem).RuleType  == EwavRuleType.Recode)
                //{

                //}
            }
        }