public EdgePropertiesForm(Edge edge)
        {
            InitializeComponent();

            this.Background = Statics.FormBackground;
            this.edge       = edge;

            Statics.AddImageToButtonWithText(SaveButton, "checkmark48.png");

            Statics.AddImageToComboBox(comboBox1, "arrow1.png");
            Statics.AddImageToComboBox(comboBox1, "arrow6.png");
            Statics.AddImageToComboBox(comboBox1, "arrow3.png");
            Statics.AddImageToComboBox(comboBox1, "arrow2.png");
            Statics.AddImageToComboBox(comboBox1, "arrow5.png");
            Statics.AddImageToComboBox(comboBox1, "arrow4.png");

            comboBox1.SelectedIndex = (int)edge.HeadSymbol;

            Statics.AddImageToComboBox(comboBox2, "arrow1.png");
            Statics.AddImageToComboBox(comboBox2, "arrow6.png");
            Statics.AddImageToComboBox(comboBox2, "arrow3.png");
            Statics.AddImageToComboBox(comboBox2, "arrow2.png");
            Statics.AddImageToComboBox(comboBox2, "arrow5.png");
            Statics.AddImageToComboBox(comboBox2, "arrow4.png");

            comboBox2.SelectedIndex = (int)edge.TailSymbol;

            Statics.AddImageToComboBox(comboBox3, "arrow1.png");
            Statics.AddImageToComboBox(comboBox3, "arrow8.png");
            Statics.AddImageToComboBox(comboBox3, "arrow9.png");

            comboBox3.SelectedIndex = (int)edge.EdgeBrushType;
        }
示例#2
0
        private void init()
        {
            splashScreen = new SplashScreen();
            splashScreen.Show();

            MainGrid.Margin = new Thickness(0, 5, 0, 0);

            Statics.FormBackground = this.Background;

            Statics.AddImageToButton(NewButton, "Tango Icons\\x-office-drawing.png");
            Statics.AddImageToButton(OpenButton, "Tango Icons\\document-open.png");
            Statics.AddImageToButton(SaveButton, "Tango Icons\\document-save.png");
            Statics.AddImageToButton(NewButton1, "Tango Icons\\x-office-drawing.png");
            Statics.AddImageToButton(OpenButton1, "Tango Icons\\document-open.png");
            Statics.AddImageToButton(SaveButton1, "Tango Icons\\document-save.png");
            Statics.AddImageToButton(SaveAsButton, "Tango Icons\\document-save-as.png");
            Statics.AddImageToButton(ClipDocumentButton, "Clip48.png");

            Statics.AddImageToButton(ExporttButton, "Tango Icons\\image-x-generic.png");
            Statics.AddImageToButton(WebsiteButton, "Tango Icons\\internet-web-browser.png");
            Statics.AddImageToButton(AboutButton, "Tango Icons\\dialog-information.png");
            Statics.AddImageToButton(AboutButton1, "Tango Icons\\dialog-information.png");
            Statics.AddImageToButton(HelpButton, "Tango Icons\\help-browser.png");
            Statics.AddImageToButton(HelpButton1, "Tango Icons\\help-browser.png");
            Statics.AddImageToButton(StartupButton, "Tango Icons\\go-home.png");

            DefaultEdgeTypeComboBox.ToolTip = "Default edge ends";

            Statics.AddImageToComboBox(DefaultEdgeTypeComboBox, "arrow1.png");
            Statics.AddImageToComboBox(DefaultEdgeTypeComboBox, "arrow2.png");
            Statics.AddImageToComboBox(DefaultEdgeTypeComboBox, "arrow3.png");
            Statics.AddImageToComboBox(DefaultEdgeTypeComboBox, "arrow4.png");
            Statics.AddImageToComboBox(DefaultEdgeTypeComboBox, "arrow5.png");
            Statics.AddImageToComboBox(DefaultEdgeTypeComboBox, "arrow6.png");
            Statics.AddImageToComboBox(DefaultEdgeTypeComboBox, "arrow7.png");
            DefaultEdgeTypeComboBox.SelectedIndex = 1;

            DefaultEdgeBrushComboBox.ToolTip = "Default edge brush";
            Statics.AddImageToComboBox(DefaultEdgeBrushComboBox, "arrow1.png");
            Statics.AddImageToComboBox(DefaultEdgeBrushComboBox, "arrow8.png");
            Statics.AddImageToComboBox(DefaultEdgeBrushComboBox, "arrow9.png");
            DefaultEdgeBrushComboBox.SelectedIndex = 0;

            defineShapes();
            defineStyles();

            scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
            newGraph();
            this.PreviewKeyDown += new KeyEventHandler(OnKeyDown);
        }