Esempio n. 1
0
		public Column ToColumn(Main m)
		{
			var v = new Twitterizer.Streaming.StreamOptions();
			v.Track.AddRange(Rc.CutString(",", Track));
			v.Follow.AddRange(Rc.CutString(",", Follow));
			try
			{
				if (Image == "null")
					return new Column(new Twitterizer.Streaming.TwitterStream(m.Accounts[AccountName].OAuthTokens, "Alicium", v), ColumnType, Tille);
				else
				{
					using (var f = File.OpenRead(Image))
					{
						var b = Bitmap.FromStream(f);
						return new Column(new Twitterizer.Streaming.TwitterStream(m.Accounts[AccountName].OAuthTokens, "Alicium", v), ColumnType, Tille, (Image)b.Clone());
					}
				}
			}
			catch
			{
				MessageBox.Show("Can't find "+AccountName+" from accounts data.Please authenticate again.","Not Found",MessageBoxButtons.OK,MessageBoxIcon.Exclamation,MessageBoxDefaultButton.Button1,MessageBoxOptions.DefaultDesktopOnly,false);
				return null;
			}
		}
Esempio n. 2
0
		public TwitterDo(Main _m)
		{
			m = _m;
		}
Esempio n. 3
0
		public static Column[] Load(Main main)
		{
			int load = 0;
			var l = new List<Column>();
			while (File.Exists(Application.StartupPath + "/Settings/Columns_" + load + ".dat"))
			{
				var data = (ColumnData)Rc.LoadFromXML<ColumnData>(Application.StartupPath + "/Settings/Columns_" + load + ".dat");
				var add = data.ToColumn(main);
				if(add != null)
				{
					l.Add(add);
				}
				load++;
			}
			while(File.Exists(Application.StartupPath + "/Settings/" + load + ".bmp"))
			{
				File.Delete(Application.StartupPath + "/Settings/" + load + ".bmp");
				load++;
			}
			return l.ToArray();
		}
Esempio n. 4
0
 public ScriptWriter(Main _m)
 {
     InitializeComponent();
     m = _m;
     openFileDialog1.InitialDirectory = saveFileDialog1.InitialDirectory = Application.StartupPath + "Scripts";
 }