예제 #1
0
        public fontChooser(updateText tUp, bool isUpdate)
        {
            InitializeComponent();
            fontCombo.ItemsSource = Fonts.SystemFontFamilies;
            updating = isUpdate;
            t_Up = tUp;

            t_Up.textBox1.FontFamily = new FontFamily();
            t_Up.textBox1.FontFamily = t_Up.w_Cur.ff;
            t_Up.textBox1.FontSize = t_Up.w_Cur.fontSize;
            t_Up.textBox1.Foreground = t_Up.w_Cur.fontColor;
        }
예제 #2
0
파일: Window1.xaml.cs 프로젝트: jaelle/blob
 private void Properties_Click(object sender, RoutedEventArgs e)
 {
     int loc;
     //populate the windows.
     if (curType == (int)TYPE.SHAPE)
     {
         loc = findElement((int)TYPE.SHAPE);
         updateShapexaml uShp = new updateShapexaml(this);
         uShp.WidthT.Text = myScene[loc].width.ToString();
         uShp.HeightT.Text = myScene[loc].height.ToString();
         if (myScene[loc].linksTo != null)
         {
             uShp.textBox1.Text = myScene[loc].linksTo.ToString();
         }
         if (myScene[loc].fileName != null)
         {
             uShp.textBox1.Text = myScene[loc].fileName.ToString();
         }
         if (myScene[loc].linksTo != null)
         {
             uShp.textBox1.Text = myScene[loc].linksTo.ToString();
         }
         if (myScene[loc].gesturesAllowed[0])
         {
             uShp.checkBox1.IsChecked = true;
         }
         if (myScene[loc].gesturesAllowed[1])
         {
             uShp.checkBox2.IsChecked = true;
         }
         if (myScene[loc].gesturesAllowed[2])
         {
             uShp.checkBox3.IsChecked = true;
         }
         uShp.ShowDialog();
     }
     if (curType == (int)TYPE.TEXT)
     {
         loc = findElement((int)TYPE.TEXT);
         updateText uTxt = new updateText(this);
         uTxt.WidthT.Text = myScene[loc].width.ToString();
         uTxt.HeightT.Text = myScene[loc].height.ToString();
         uTxt.textBox1.Text = myScene[loc].fileName.ToString();
         if (myScene[loc].linksTo != null)
         {
             uTxt.textBox2.Text = myScene[loc].linksTo.ToString();
         }
         if (myScene[loc].gesturesAllowed[0])
         {
             uTxt.checkBox1.IsChecked = true;
         }
         if (myScene[loc].gesturesAllowed[1])
         {
             uTxt.checkBox2.IsChecked = true;
         }
         if (myScene[loc].gesturesAllowed[2])
         {
             uTxt.checkBox3.IsChecked = true;
         }
         uTxt.ShowDialog();
     }
     if (curType == (int)TYPE.IMAGE)
     {
         loc = findElement((int)TYPE.IMAGE);
         updateImage uImg = new updateImage(this);
         uImg.WidthT.Text = myScene[loc].width.ToString();
         uImg.HeightT.Text = myScene[loc].height.ToString();
         if (myScene[loc].linksTo != null)
         {
             uImg.textBox1.Text = myScene[loc].linksTo.ToString();
         }
         if (myScene[loc].gesturesAllowed[0])
         {
             uImg.checkBox1.IsChecked = true;
         }
         if (myScene[loc].gesturesAllowed[1])
         {
             uImg.checkBox2.IsChecked = true;
         }
         if (myScene[loc].gesturesAllowed[2])
         {
             uImg.checkBox3.IsChecked = true;
         }
         uImg.ShowDialog();
     }
     if (curType == (int)TYPE.VIDEO)
     {
         loc = findElement((int)TYPE.VIDEO);
         updateImage uImg = new updateImage(this);
         uImg.WidthT.Text = myScene[loc].width.ToString();
         uImg.HeightT.Text = myScene[loc].height.ToString();
         if (myScene[loc].linksTo != null)
         {
             uImg.textBox1.Text = myScene[loc].linksTo.ToString();
         }
         if (myScene[loc].gesturesAllowed[0])
         {
             uImg.checkBox1.IsChecked = true;
         }
         if (myScene[loc].gesturesAllowed[1])
         {
             uImg.checkBox2.IsChecked = true;
         }
         if (myScene[loc].gesturesAllowed[2])
         {
             uImg.checkBox3.IsChecked = true;
         }
         uImg.ShowDialog();
     }
     if (curType == (int)TYPE.AUDIO)
     {
         loc = findElement((int)TYPE.AUDIO);
     }
 }