コード例 #1
0
        /// <summary>
        /// Set the NodeViewMode to view.
        /// </summary>
        /// <remarks>
        /// Setting the mode to view hides the main grid while setting the visibility of the name
        /// and description draggable labels to Visible.
        /// </remarks>
        void SetViewMode()
        {
            grdMain.Visibility       = Visibility.Collapsed;
            dlDescription.Visibility = Visibility.Visible;
            dlName.Visibility        = Visibility.Visible;

            btnMode.DefaultImage = "pack://application:,,,/CodeFlowBuilder;component/Resources/Images/EButton.png";
            btnMode.HoverImage   = "pack://application:,,,/CodeFlowBuilder;component/Resources/Images/EButtonHover.png";
            btnMode.PressedImage = "pack://application:,,,/CodeFlowBuilder;component/Resources/Images/EButtonPressed.png";

            _currentMode = NodeViewMode.View;
        }
コード例 #2
0
ファイル: TemplateNodeView.cs プロジェクト: minskowl/MY
        /// <summary> Default constructor: sets up the Velocity
        /// Runtime, creates the visitor for traversing
        /// the node structure and then produces the
        /// visual representation by the visitation.
        /// </summary>
        public TemplateNodeView(System.String template)
        {
            try {
                RuntimeSingleton.init("velocity.properties");

                System.IO.StreamReader isr = new InputStreamReader(new System.IO.FileStream(template, System.IO.FileMode.Open, System.IO.FileAccess.Read), RuntimeSingleton.getString(RuntimeSingleton.INPUT_ENCODING))
                ;

                //UPGRADE_ISSUE: The equivalent of constructor 'java.io.BufferedReader.BufferedReader' is incompatible with the expected type in C#. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1109"'
                System.IO.StreamReader br = new System.IO.StreamReader(isr.BaseStream);

                document = RuntimeSingleton.parse(br, template)
                ;

                visitor         = new NodeViewMode();
                visitor.Context = null;
                //UPGRADE_ISSUE: The equivalent of parameter java.lang.System.out is incompatible with the expected type in C#. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1109"'
                visitor.Writer = new System.IO.StreamWriter(System.Console.Out);
                document.jjtAccept(visitor, null);
            } catch (System.Exception e) {
                System.Console.Out.WriteLine(e);
                SupportClass.WriteStackTrace(e, Console.Error);
            }
        }
コード例 #3
0
        /// <summary> Default constructor: sets up the Velocity
        /// Runtime, creates the visitor for traversing
        /// the node structure and then produces the
        /// visual representation by the visitation.
        /// </summary>
        public TemplateNodeView(System.String template)
        {
            try {
            RuntimeSingleton.init("velocity.properties");

            System.IO.StreamReader isr = new InputStreamReader(new System.IO.FileStream(template, System.IO.FileMode.Open, System.IO.FileAccess.Read), RuntimeSingleton.getString(RuntimeSingleton.INPUT_ENCODING))
            ;

            //UPGRADE_ISSUE: The equivalent of constructor 'java.io.BufferedReader.BufferedReader' is incompatible with the expected type in C#. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1109"'
            System.IO.StreamReader br = new System.IO.StreamReader(isr.BaseStream);

            document = RuntimeSingleton.parse(br, template)
            ;

            visitor = new NodeViewMode();
            visitor.Context = null;
            //UPGRADE_ISSUE: The equivalent of parameter java.lang.System.out is incompatible with the expected type in C#. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1109"'
            visitor.Writer = new System.IO.StreamWriter(System.Console.Out);
            document.jjtAccept(visitor, null);
            } catch (System.Exception e) {
            System.Console.Out.WriteLine(e);
            SupportClass.WriteStackTrace(e, Console.Error);
            }
        }