Exemplo n.º 1
0
 public SingleRootConnector()
 {
     InitializeComponent();
     AssetXML = new _AssetXML <SingleRootConnector>(this);
     LinkConnectorControl.SingleLinkMode = true;
     LinkConnectorControl.ValueData      = new ParamNameOnly("Root");
 }
Exemplo n.º 2
0
        public void LoadAppInfo()
        {
            StreamReader  reader     = new StreamReader(APP_INFO_PATH);
            XmlSerializer serializer = new XmlSerializer(AssetXML.GetType());

            XmlDocument doc = new XmlDocument();

            doc.PreserveWhitespace = true;
            doc.Load(reader);
            XmlNodeReader nodeReader = new XmlNodeReader(doc.DocumentElement);

            object data = (App._AssetXML <App>)serializer.Deserialize(nodeReader);

            AssetXML = (App._AssetXML <App>)data;
            reader.Close();
            AssetXML.ReadAction(this);
        }
Exemplo n.º 3
0
        public CommandCanvasList()
        {
            InitializeComponent();
            AssetXML = new _AssetXML <CommandCanvasList>(this);
            ClearPublicExecuteEntryPoint(null);
            Instance = this;

            // Consoleの出力先を変更する
            Console.SetOut(new SystemTextWriter());

            Tab.Items.Clear();
            Dispatcher.BeginInvoke(new Action(() =>
            {
                // アイドル状態になってから新規シートを作成する

                AddNewContents();
                if (reserveLoadCbsFilePath != null)
                {
                    // 起動読み込みをキックする(タイミングが不安…)

                    KickLoadCbsFile();
                }
            }), DispatcherPriority.ApplicationIdle);
        }
Exemplo n.º 4
0
 public SingleLinkConnector()
 {
     InitializeComponent();
     AssetXML = new _AssetXML <SingleLinkConnector>(this);
 }
Exemplo n.º 5
0
        private void Application_StartUp(object sender, StartupEventArgs e)
        {
            Instance = this;

            // カレントディレクトリに作成する
            {
                CAPY_CSS_PATH = Path.Combine(
                    System.Environment.GetFolderPath(Environment.SpecialFolder.Personal),
                    Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().GetName().Name));
                if (!Directory.Exists(CAPY_CSS_PATH))
                {
                    Directory.CreateDirectory(CAPY_CSS_PATH);
                }
                APP_INFO_PATH = Path.Combine(CAPY_CSS_PATH, APP_INFO_PATH);
            }

            // ツールチップの表示時間を設定
            System.Windows.Controls.ToolTipService.ShowDurationProperty.OverrideMetadata(
                typeof(DependencyObject),
                new FrameworkPropertyMetadata(4000));

            AssetXML = new _AssetXML <App>(this);
            if (!File.Exists(APP_INFO_PATH))
            {
                SaveAppInfo();
            }
            LoadAppInfo();

            string[] cmds = System.Environment.GetCommandLineArgs();
            if (cmds.Length > 1)
            {
                int index = 0;
                foreach (var arg in cmds)
                {
                    if (arg.StartsWith("-"))
                    {
                        switch (arg)
                        {
                        case "-as":
                            IsAutoExecute = true;
                            break;

                        case "-ae":
                            IsAutoExit = true;
                            break;

                        case "-ase":
                            IsAutoExecute = true;
                            IsAutoExit    = true;
                            break;
                        }
                        continue;
                    }
                    if (index == 1)
                    {
                        EntryLoadFile = arg;
                    }
                    index++;
                }
            }
        }
Exemplo n.º 6
0
 public MultiLinkConnector()
 {
     InitializeComponent();
     AssetXML = new _AssetXML <MultiLinkConnector>(this);
     LinkConnectorControl.SingleLinkMode = false;
 }
Exemplo n.º 7
0
 public NameLabel()
 {
     InitializeComponent();
     AssetXML   = new _AssetXML <NameLabel>(this);
     LostFocus += ExitEditMode;
 }
Exemplo n.º 8
0
 public RunableControl()
 {
     InitializeComponent();
     AssetXML    = new _AssetXML <RunableControl>(this);
     DataContext = this;
 }