示例#1
0
        public FacadeConfig()
        {
            InitializeComponent();
            InitializeCommand();
            this.DataContext = this;
            if (Global.GetAppConfig("CurrentProjectID") is null)
            {
                CurrentElementClassList = ZoneHelper.InitElementClass();
                return;
            }
            currpid           = Global.GetAppConfig("CurrentProjectID");
            txtProjectID.Text = currpid;
            txtParamFile.Text = Global.GetAppConfig("SharedParametersFile") ?? System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), $"{currpid}.param");
            //txtProjectName.Text = Global.GetAppConfig("CurrentProjectName") ?? "未设置"; //针对COCC项目测试方便,该项值用预设
            txtRVTPrecision.Text = Global.GetAppConfig("RVTPrecision") ?? "0.03";
            zfile  = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), $"{currpid}.zone.xml");
            ecfile = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), $"{currpid}.class.xml");

            if ((CurrentZoneLayerList = ZoneHelper.FnZoneDataDeserialize()) is null)
            {
                listInformation.SelectedIndex = listInformation.Items.Add($"{DateTime.Now:HH:mm:ss} - ERR: ZONE LAYER/NOT SET.");
            }
            if ((CurrentElementClassList = ZoneHelper.FnFilterClassDeserialize()) is null)
            {
                listInformation.SelectedIndex = listInformation.Items.Add($"{DateTime.Now:HH:mm:ss} - ERR: ELEMENT CLASS/NOT SET.");
                CurrentElementClassList       = ZoneHelper.InitElementClass();
                listInformation.SelectedIndex = listInformation.Items.Add($"{DateTime.Now:HH:mm:ss} - INIT: ELEMENT CLASS.");
            }
        }