本文整理汇总了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 ();
}
示例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;
}