Beispiel #1
0
        private void Load_Screen(String sScreen)
        {
            String sPath      = "";
            Int32  iOldHeight = 0;

            gCurrentScreen = sScreen;
            OSAEApi.ObjectPropertySet(gAppName, "Current Screen", sScreen);
            sPath = OSAEApi.APIpath + OSAEApi.GetObjectProperty(sScreen, "Background Image");
            if (gCurrentScreen != sScreen)
            {
                gCurrentScreen = sScreen;
            }
            if (File.Exists(sPath))
            {
                byte[] byteArray   = File.ReadAllBytes(sPath);
                var    imageStream = new MemoryStream(byteArray);
                var    bitmapImage = new BitmapImage();

                bitmapImage.BeginInit();
                bitmapImage.StreamSource = imageStream;
                bitmapImage.EndInit();
                canGUI.Background = new ImageBrush(bitmapImage);
                canGUI.Height     = bitmapImage.Height + 34;
                canGUI.Width      = bitmapImage.Width + 12;
            }
            ///Controls_Clear()
            Load_Objects(gCurrentScreen);
            //Load_User_Controls(gCurrentScreen)
        }
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            ComboBoxItem cbi = (ComboBoxItem)cbDebugging.SelectedItem;

            osae.ObjectPropertySet("SYSTEM", "Debug", cbi.Content.ToString());
            osae.ObjectPropertySet("SYSTEM", "ZIP Code", txbxZipcode.Text);
            this.Close();
        }
 private void Load_App_Name()
 {
     try
     {
         gAppName = OSAEApi.GetPluginName("VR CLIENT", OSAEApi.ComputerName);
         if (gAppName == "")
         {
             gAppName = "VR CLIENT-" + OSAEApi.ComputerName;
             OSAEApi.ObjectAdd(gAppName, gAppName, "VR CLIENT", "", "SYSTEM", true);
             OSAEApi.ObjectPropertySet(gAppName, "Computer Name", OSAEApi.ComputerName);
         }
     }
     catch (Exception ex)
     {
         AddToLog("Error messaging host: " + ex.Message);
     }
 }