当前位置: 首页>>代码示例>>C#>>正文


C# Group.Show方法代码示例

本文整理汇总了C#中Group.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Group.Show方法的具体用法?C# Group.Show怎么用?C# Group.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Group的用法示例。


在下文中一共展示了Group.Show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Main

        public static void Main(string[] args)
        {
            Application.Init ();

            Stage stage = Stage.Default as Stage;
            (stage as Stage).KeyPressEvent += delegate {
                Clutter.Main.Quit();
            };

            // fixme: add constructor
            Clutter.Color stage_color = new Clutter.Color (0xcc, 0xcc, 0xcc, 0xff);
            stage.SetColor (stage_color);

            Clutter.Group group = new Group();
            stage.Add (group);
            group.Show ();

            // Make a hand
            Clutter.Actor hand = new Texture ("redhand.png");
            hand.SetPosition (0,0);
            hand.Show ();

            // Make a rect
            Clutter.Rectangle rect = new Clutter.Rectangle();
            rect.SetPosition (0,0);
            rect.SetSize ((int)hand.Width, (int)hand.Height);

            Clutter.Color rect_bg_color = new Clutter.Color (0x33, 0x22, 0x22, 0xff);
            rect.SetColor (rect_bg_color);
            rect.BorderWidth = 10;
            rect.Show ();

            group.Add (rect);
            group.Add (hand);

            // Make a timeline
            Timeline timeline = new Timeline (100, 26);
            timeline.Loop = true;

            Alpha alpha = new Alpha (timeline, (a) => a.Value);

            Behaviour o_behave = new BehaviourOpacity (alpha, 0x33, 0xff);
            o_behave.Apply (group);

            // Make a path behaviour and apply that too
            Behaviour p_behave = new BehaviourPath(alpha, knots); // fixme: add custom constructor?
            p_behave.Apply (group);

            // start timeline
            timeline.Start ();

            stage.ShowAll();

            // launch
            Application.Run ();
        }
开发者ID:abock,项目名称:clutter-sharp,代码行数:56,代码来源:test-behave.cs

示例2: MainWindow

 public MainWindow()
 {
     InitializeComponent();
     Uri uri = new Uri("pack://application:,,,/B_32x32.ico", UriKind.RelativeOrAbsolute);
     this.Icon = BitmapFrame.Create(uri);
     try
     {
         _settings = ProgramSettings.Load("Settings.xml");
     }
     catch (Exception)
     {
         _settings = new ProgramSettings();
     }
     // Show map and status dialog by default.
     if (_mapDlg == null)
     {
         _mapDlg = new Map();
         _mapDlg.Top = 6;
         _mapDlg.Left = 6;
     }
     _mapDlg.Show();
     if (_statusDlg == null)
     {
         _statusDlg = new Status();
         _statusDlg.Top = 420;
         _statusDlg.Left = 6;
     }
     _statusDlg.Show();
     if (_equipmentDlg == null)
     {
         _equipmentDlg = new Equipment();
         _equipmentDlg.Top = 6;
         _equipmentDlg.Left = 924;
         if (_settings.ShowEquipment)
         {
             _equipmentDlg.Show();
         }
     }
     if (_settings.ShowHotKeys)
     {
         _hotkeysDlg = new Hotkeys(this, _settings);
         _hotkeysDlg.Left = 326;
         _hotkeysDlg.Top = 716;
         _hotkeysDlg.Show();
     }
     if (_settings.ShowGroup)
     {
         _groupDlg = new Group();
         _groupDlg.Top = 606;
         _groupDlg.Left = 924;
         _groupDlg.Show();
     }
     this.Top = 6;
     this.Left = 326;
 }
开发者ID:carriercomm,项目名称:ModernMUD,代码行数:55,代码来源:MainWindow.xaml.cs


注:本文中的Group.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。